package com.zsk.sso.util;

import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import com.zsk.sso.vo.ClientInfoVo;

public class MockDbUtil {
    public static Set<String> DB_TOKEN = new HashSet<String>();
    public static ConcurrentHashMap<String, List<ClientInfoVo>> DB_CLIENT_INFO =
        new ConcurrentHashMap<String, List<ClientInfoVo>>();

    public static synchronized void addToken(String token) {
        DB_TOKEN.add(token);
    }

    public static synchronized void removeToken(String token) {
        DB_TOKEN.remove(token);
    }

    public static synchronized boolean containsToken(String token) {
        return DB_TOKEN.contains(token);
    }
}
